package org.wy;

import feign.Logger;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * @name: SgspwScreenApplication
 * @author: Zhang Jian
 * @date: 2024-01-09 10:29
 */
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
@MapperScan(value = {"org.wy.mapper"})
public class SgspwScreenApplication {
    public static void main(String[] args) {
        SpringApplication.run(SgspwScreenApplication.class, args);
    }

    @Bean
    Logger.Level feignLoggerLevel(){
        //开启详细日志
        /**
         NONE：默认的，不显示任何日志；

         BASIC：仅记录请求方法、URL、响应状态码及执行时间；

         HEADERS：除了 BASIC 中定义的信息之外，还有请求和响应的头信息；

         FULL：除了 HEADERS 中定义的信息之外，还有请求和响应的正文及元数据。
         */
        return Logger.Level.HEADERS;
    }
}
